import { createApp } from 'vue'

import App from './App.vue'
import './index.css'
import '@/style/normal.less'
import router from './router'

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

//使用pinia
import { createPinia } from 'pinia'
const pinia = createPinia()

app.use(router) //use router
app.use(ElementPlus, { locale: zhCn })
app.use(pinia)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')
